# -*- coding: utf-8 -*-
#Create By hacklh, 2017/7/7
from socketserver import (TCPServer as TCP, StreamRequestHandler as SRH, ThreadingMixIn as TMI)  # 变动位置
from time import ctime

HOST = ''
PORT = 1234
ADDR = (HOST, PORT)

class Server(TMI, TCP):  # 变动位置
    pass


class MyRequestHandler(SRH):
    def handle(self):
        print('已经连接:', self.client_address)
        print(self.rfile)
        # self.wfile.write(('[%s] %s' % (ctime(), self.rfile.readline().decode("UTF-8"))).encode("UTF-8"))


tcp_server = Server(ADDR, MyRequestHandler)  # 变动位置
print('等待新的连接。。。。')
tcp_server.serve_forever()